package com.example.demo.rest.ecom;

import com.example.demo.api.ecom.StoreApi;
import com.example.demo.bean.vo.EcomPreAuthSwitchRequest;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StoreController {
    @Autowired
    StoreApi storeApi;

    @GetMapping("getStores")
    @ApiOperation(value = "获取Stores", notes = "获取Stores aaa")
    public Object getStores() {
        return storeApi.getStores();
    }

    @GetMapping("getDisplayCountries")
    public Object getDisplayCountries() {
        return storeApi.getDisplayCountries();
    }

    @PostMapping("getUnitInfo")
    public Object getUnitInfo(@RequestBody  EcomPreAuthSwitchRequest ecomPreAuthSwitchRequest) {
        System.out.println(ecomPreAuthSwitchRequest);
        return storeApi.getUnitInfo(ecomPreAuthSwitchRequest);
    }


}
